<template>
  <div>
  <div style="height: 1000px;border: 1px solid red">

  </div>

  <div  style="height: 150px;border: 1px solid red">
    <van-sticky position="bottom" :offset-bottom="50" :container="container">
      <van-button type="warning">指定容器</van-button>
    </van-sticky>

  </div>
  <div ref="container" style="height: 1000px;border: 1px solid red">
    <van-sticky  position="bottom">
      <van-button type="primary">吸底距离</van-button>
    </van-sticky>
  </div>
  </div>
</template>
<script>
import {ref} from 'vue'
export default {
  setup() {
    const container = ref(null);
    return { container };
  },
};

</script>